// 公表管理
export const tableOption = {
  border: true,
  index: true,
  indexLabel: "序号",
  stripe: true,
  menuAlign: "center",
  align: "center",
  searchMenuSpan: 6,
  searchBtnText: "查询",
  emptyBtnText: "重置",
  editBtn: false,
  delBtn: false,
  viewBtn: false,
  addBtn: false,
  columnBtn: false,
  menuWidth: 140,
  dialogEscape: false,
  dialogClickModal: false,
  column: [
    {
      type: "input",
      label: "主键",
      hide: true,
      prop: "id"
    },
    {
      type: "select",
      label: "房产类型",
      width: "150px",
      prop: "projectBuildingId",
      search: true,
      searchslot: true,
      dicUrl: "/admin/dict/type/rm_project_buiding_type",
      formatter: function(row, value, label, column) {
        return value + "";
      }
    },
    {
      label: "楼号/位置",
      slot: false,
      search: true,
      searchslot: true,
      width: "150px",
      prop: "projectFloorNumber"+''
    },
    {
      type: "month",
      label: "应缴月份",
      search: true,
      width: "100px",
      prop: "writeDate",
      format: "yyyy-MM",
      valueFormat: "yyyy-MM",
      formatter: function(row, value, label, column) {
        if (value) {
          return value.replace("-", "年") + "月";
        } else {
          return "";
        }
      }
    },
    {
      type: "input",
      label: "水费本期总用量",
      width: "150px",
      prop: "waterTotalPoint"
    },
    {
      type: "input",
      label: "电量本期总用量",
      width: "150px",
      prop: "electricTotalPoint"
    },
    {
      type: "input",
      label: "抄表时间",
      prop: "writeTime"
    },
    {
      type: "input",
      label: "创建人",
      hide: true,
      prop: "createBy"
    },
    {
      type: "input",
      label: "创建时间",
      hide: true,
      prop: "createDate"
    },
    {
      type: "input",
      label: "更新者",
      hide: true,
      prop: "updateBy"
    },
    {
      type: "input",
      width: "150px",
      label: "最近编辑时间",
      hide: true,
      prop: "updateDate"
    },
    {
      type: "input",
      label: "备注信息",
      hide: true,
      prop: "remarks"
    },
    {
      type: "input",
      label: "删除",
      hide: true,
      prop: "isDeleted"
    },
    {
      type: "input",
      hide: true,
      label: "逻辑删除标记（0：显示；1：隐藏",
      prop: "delFlag"
    }
  ]
};

// 新增抄表信息
export const tableOptionModify = {
  addBtn: false,
  border: true,
  index: true,
  editBtn: false,
  indexLabel: "序号",
  stripe: true,
  menuAlign: "center",
  align: "center",
  refreshBtn: false,
  columnBtn: false,
  searchSize: "mini",
  cellBtn: true,
  delBtn: false,
  delBtnText: "清除",
  rowKey: "indexid",
  dialogEscape: false,
  dialogClickModal: false,
  column: [
    {
      width: 150,
      hide: true,
      label: "",
      prop: "indexid"
    },
    {
      width: 150,
      label: "位置",
      prop: "projectFloorNumber",
      formatter: function(row, value, label, column) {
        return value;
      }
    },
    {
      cell: true,
      label: "上期读数",
      prop: "startPoint"
    },
    {
      cell: true,
      label: "本期读数",
      prop: "endPoint"
    },
    {
      label: "本月用量",
      prop: "totalPoint",
      type: "input"
    }
  ]
};

// 新增抄表信息
export const tableOptionAddModify = {
  addBtn: false,
  border: true,
  index: true,
  editBtn: false,
  indexLabel: "序号",
  stripe: true,
  menuAlign: "center",
  align: "center",
  refreshBtn: false,
  columnBtn: false,
  searchSize: "mini",
  cellBtn: true,
  delBtn: false,
  delBtnText: "清除",
  rowKey: "indexid",
  menuWidth: 130,
  dialogEscape: false,
  dialogClickModal: false,
  column: [
    {
      width: 150,
      hide: true,
      label: "",
      prop: "indexid"
    },
    {
      width: 120,
      label: "楼层/位置",
      prop: "projectFloorNumber",
      formatter: function(row, value, label, column) {
        // return value.replace("楼", "") + "楼";
        return value;
      }
    },
    {
      cell: true,
      label: "上期读数",
      prop: "startPoint"
    },
    {
      cell: true,
      label: "本期读数",
      prop: "endPoint"
    },
    {
      label: "本月用量",
      prop: "totalPoint",
      type: "input"
    }
  ]
};
// 历史记录
export const HistoryOptions = {
  addBtn: false,
  border: true,
  index: true,
  editBtn: false,
  indexLabel: "序号",
  stripe: true,
  menuAlign: "center",
  align: "center",
  refreshBtn: false,
  columnBtn: false,
  searchSize: "mini",
  cellBtn: true,
  delBtn: false,
  delBtnText: "清除",
  rowKey: "indexid",
  menuWidth: 130,
  menu: false,
  dialogEscape: false,
  dialogClickModal: false,
  column: [
    {
      width: 120,
      label: "楼层/位置",
      prop: "projectFloorNumber"
      // formatter: function(row, value, label, column) {
      //   return value.replace("楼", "") + "楼";
      // }
    },
    {
      cell: true,
      label: "上期读数",
      prop: "startPoint"
    },
    {
      cell: true,
      label: "本期读数",
      prop: "endPoint"
    },
    {
      label: "本月用量",
      prop: "totalPoint",
      type: "input"
    }
    // {
    //   label: "操作人",
    //   prop: "updateByName",
    //   type: "input"
    // },
    // {
    //   label: "操作时间",
    //   prop: "updateTime",
    //   type: "input"
    // }
  ]
};
